package com.cm309.hospital.controller;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.cm309.hospital.dao.BookingStep1Dao;

@WebServlet("/bookingStep1.do")
public class bookingStep1 extends HttpServlet{

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
//		super.doGet(req, resp);
		
		List subjects = new ArrayList();
		BookingStep1Dao subjectDao = new BookingStep1Dao();
		subjects = subjectDao.queryAll();
		req.setAttribute("subjects",subjects);
		req.getRequestDispatcher("view/bookingStep1.jsp").forward(req, resp);
	}
	
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
//		super.doPost(req, resp);
	}


}
